import sys  
from PyQt5.QtWidgets import QApplication, QMainWindow, QVBoxLayout, QWidget
from PyQt5.QtWebEngineWidgets import QWebEngineView  
from PyQt5.QtCore import QUrl, Qt


class MainWindow(QMainWindow):  
    def __init__(self, html_file_path):  
        super().__init__()
        # 设置窗口属性，去除边框
        self.setWindowFlags(Qt.FramelessWindowHint)
        self.setGeometry(100, 100, 600, 400)  # 设置窗口位置和大小
        # 创建QWebEngineView实例  
        self.web_view = QWebEngineView()
        # 加载HTML文件  
        self.web_view.setUrl(QUrl.fromLocalFile(html_file_path))
        # 设置布局和中央部件
        layout = QVBoxLayout()
        layout.addWidget(self.web_view)
        container = QWidget()
        container.setLayout(layout)
        self.setCentralWidget(container)


if __name__ == '__main__':
    # 替换为你的HTML文件路径  
    html_file_path = 'D:/webstormProject/test/特效/几何隧道/index.html'
    app = QApplication(sys.argv)  
    window = MainWindow(html_file_path)  
    window.show()  
    sys.exit(app.exec_())